import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    rankCategory: null, //排名分类数据
    chapter: null, //章节
    imgHeader: "https://statics.zhuishushenqi.com",
    clientWidth: "",
    clientHeight: "",
  },
  mutations: {
    updateRankCategory (state, payload) {
      state.rankCategory = payload;
    },
    updateChapter (state, payload) {
      state.chapter = payload;
    },
    initClientData (state, newState) {
      state.clientWidth = newState.clientWidth;
      state.clientHeight = newState.clientHeight;
    }
  },
  actions: {},
  modules: {},
});
